package com.kimehwa.studyboot.webjava.observer;

public class Thief {
    private ThiefListener thiefListener;
    public void registerListener(ThiefListener thiefListener){
        this.thiefListener = thiefListener;
    }

    public void steal(){
        if(thiefListener!=null){
            Event event = new Event(this);
            thiefListener.shot(event);
        }
        System.out.println("to steal money");
    }

}
